﻿using Game.Common;
using Game.Level;
using Game.Map;
using Game.Map.Extensions;
using Game.Objects;

namespace Game.Command.Internal
{
    class UnitAttacksSomething : FightObject
    {
        private readonly Vehicle _AttackingUnit;
        private readonly IMapField _AttackingField;
      
        public UnitAttacksSomething(
            IGameMapView gameMap,
            GameLevels levels,
            IMapField attackingField)
            : base(gameMap, levels)
        {
            _AttackingUnit = attackingField.VehicleX().Vehicle;
            _AttackingField = attackingField;
        }
      
        public GamePlayer AttackingPlayer
        {
            get { return _AttackingUnit.Owner; }
        }
        
        public Vehicle AttackingUnit
        {
            get { return _AttackingUnit; }
        }
        
        public IMapField AttackingField
        {
            get { return _AttackingField; }
        }
    }
}
